#pragma once

class ScreenRecv : public base::_class
{
private:
	bool				_closeInst;
protected:
	base::DrawBitmap	_screenBmp;
	base::Memory<char>	_scrData;
	base::View*			_showWnd;
	TCPStream			_clientSocket;
	base::Thread		_connectThread;

	void _ConnectServer();
	void _OnRecv(const char* data,int len,const char* head,int headLen);
public:
	ScreenRecv(void);
	~ScreenRecv(void);

	void Initialize(base::View* showWnd);
	base::DrawBitmap* ScreenBitmap(){return &_screenBmp;}
	void WaitClose(){_clientSocket.WaitClose();}
};
